////////////////////////////////////////////////////////////////////////////////
//
//  FLYING KIWI BV
//  Copyright 2010 Flying Kiwi BV
//  All Rights Reserved.
//
//  NOTICE: Flying Kiwi permits you to use, modify, and distribute this file
//  in accordance with the terms of the license agreement accompanying it.
//
////////////////////////////////////////////////////////////////////////////////
package plantool.data {
	//--------------------------------------------------------------------------
	//  Imports
	//--------------------------------------------------------------------------
	import plantool.core.CoreObject;
	
	//--------------------------------------------------------------------------
	//  [Metadata (Events, Style, Effects etc)]
	//--------------------------------------------------------------------------
	
	//--------------------------------------------------------------------------
	//  Class declaration
	//--------------------------------------------------------------------------
	public class QueryResult extends CoreObject {
		//--------------------------------------------------------------------------
		//Class constants
		//--------------------------------------------------------------------------
		
		//--------------------------------------------------------------------------
		//Class variables
		//--------------------------------------------------------------------------
		private var _data:Array				= null;
		private var _insertRowId:Number		= 0;
		private var _query:String			= "";
		private var _userdata:*				= null;
		
		//--------------------------------------------------------------------------
		//Class properties
		//--------------------------------------------------------------------------
		public function get data():Array {
			return _data;
		}
		
		public function get insertRowId():Number {
			return _insertRowId;
		}
		
		public function get query():String {
			return _query;
		}
		
		public function get userdata():* { 
			return _userdata;
		}
		//--------------------------------------------------------------------------
		//Constructor and Destructor
		//--------------------------------------------------------------------------
		public function QueryResult(d:Array, q:String, rowId:Number = 0, udata:* = null) {
			super();
			
			_data 			= d;
			_insertRowId 	= rowId;
			_query			= q;
			_userdata		= udata;
		}
		
		//--------------------------------------------------------------------------
		//Class methods
		//--------------------------------------------------------------------------
	}
}